package com.ebupt.migu.music.songlist.controller;

import com.ebupt.migu.music.common.entity.ResultObject;
import com.ebupt.migu.music.songlist.dto.QueryDto;
import com.ebupt.migu.music.songlist.service.EffectTrackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 *  榜单运营 -- 效果跟踪
 * @author tz
 */
@Slf4j
@RestController
@RequestMapping("/song/effect")
public class EffectTrackController {

    @Resource
    private EffectTrackService effectTrackService;

    /**
     * 榜单下拉列表
     */
    @GetMapping("/bdList")
    public ResultObject bdList() {
        return effectTrackService.bdList();
    }

    /**
     * 行为趋势分析
     */
    @PostMapping("/actionTrend")
    public ResultObject actionTrend(@RequestBody QueryDto queryDto) {
        return effectTrackService.actionTrend(queryDto);
    }

    /**
     * 留存时序分析
     */
    @PostMapping("/retention")
    public ResultObject retention(@RequestBody QueryDto queryDto) {
        return effectTrackService.retention(queryDto);
    }

    /**
     * 行为漏斗分析
     */
    @PostMapping("/actionFunnel")
    public ResultObject actionFunnel(@RequestBody QueryDto queryDto) {
        return effectTrackService.actionFunnel(queryDto);
    }

    /**
     * 榜单歌曲排名
     */
    @PostMapping("/songRank")
    public ResultObject songRank(@RequestBody QueryDto queryDto) {
        return effectTrackService.songRank(queryDto);
    }
}